#include "stm32f10x.h"
#include "delay.h"
#include "usart.h"
#include "dht11.h"

int main()
{
	DHT11_Data_TypeDef DHT11_Data;
	USART1_Init();
	Delay_init();
	DHT11_Init();
    delay_ms(1000);
	printf("欢迎来到Linklab温湿度传感器实验\r\n");
	while (1)
	{
		if (DHT11_Read_TempAndHumidity(&DHT11_Data) == SUCCESS)
		{
            printf("hello\n");
			printf("当前湿度:%d.%d％RH  温度:%d.%d℃ \r\n",DHT11_Data.humi_int, DHT11_Data.humi_deci, DHT11_Data.temp_int, DHT11_Data.temp_deci);
		}
         delay_ms(1000);
	}
}
